package cn.torna.dubbo.api;

import cn.torna.dubbo.api.param.UserParam;
import cn.torna.dubbo.api.result.UserInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

/**
 * 用户接口
 *
 * @dubbo
 */
@Api(value = "用户接口")
public interface UserService {

    /**
     * 获取用户信息
     * @param userId
     * @return
     * @apiNote <a href="https://www.baidu.com" target="_blank" style="color:blue">baidu</a>
     */
    @ApiOperation(value = "获取用户信息")
    UserInfo getUserInfo(Integer userId);

    /**
     * 修改昵称
     * @param userId 用户id
     * @param nickname 用户昵称
     */
    @ApiOperation(value = "修改昵称")
    void updateNickname(
            @ApiParam(value = "用户id", required = true, example = "111")
            Integer userId,
            @ApiParam(value = "用户昵称", required = true, example = "Jim")
            String nickname);

    /**
     * 添加用户
     * @param param
     */
    @ApiOperation(value = "添加用户")
    Integer addUser(UserParam param);
}
